/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.fourmob.datetimepicker.util;

/**
 * 记录日期状态
 * @since 2021-04-12
 */
public class RecordDateUtil {
    private static volatile boolean isFirstChange;
    private static boolean closeDay = false;
    private static boolean hasScroll = false;
    private static int year = 1099;
    private static int month;
    private static int day;

    /****
     * 是否是第一次变化
     * @return true or false
     ***/
    public static boolean isIsFirstChange() {
        return isFirstChange;
    }

    /****
     * 设置是否是第一次变化
     * @param isFirstChange  true or false
     ***/
    public static void setIsFirstChange(boolean isFirstChange) {
        RecordDateUtil.isFirstChange = isFirstChange;
    }

    /****
     * 是否可以Scroll
     * @return true or false
     ***/
    public static boolean isHasScroll() {
        return hasScroll;
    }

    /****
     * 设置是否可以滚动
     * @param hasScroll  true or false
     ***/
    public static void setHasScroll(boolean hasScroll) {
        RecordDateUtil.hasScroll = hasScroll;
    }

    /****
     * 是否可以关闭日期
     * @return true or false
     *****/
    public static boolean isCloseDay() {
        return closeDay;
    }

    /****
     * 设置是否可以关闭日期
     * @param closeDay
     *****/
    public static void setCloseDay(boolean closeDay) {
        RecordDateUtil.closeDay = closeDay;
    }

    /****
     * 获取年份
     * @return year
     *****/
    public static int getYear() {
        return year;
    }

    /****
     * 设置年份
     * @param year
     *****/
    public static void setYear(int year) {
        RecordDateUtil.year = year;
    }

    /****
     * 获取月份
     * @return month
     *****/
    public static int getMonth() {
        return month;
    }

    /****
     * 设置月份
     * @param month
     *****/
    public static void setMonth(int month) {
        RecordDateUtil.month = month;
    }

    /****
     * 获取某天
     * @return day
     *****/
    public static int getDay() {
        return day;
    }

    /****
     * 设置某天
     * @param day
     *****/
    public static void setDay(int day) {
        RecordDateUtil.day = day;
    }
}
